<!--#include virtual="/dzps/p1.asp"-->
<!DOCTYPE html>
<html>

<head>
    <!--<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>-->
    <title>
        <%=val("")%>
    </title>
    <%
  'easp.db.upd "equipmentType","typ='1026'","1=1"
	easp.include "h.asp"

	s1 "select * from v_prn where id ={equipmentId:int}"
	s1 "select name1 as title from baseinfo where id={typ}"
	
	if val("tab")="" then
		vas "tab","1"
	end if
	
%>
        <link rel="stylesheet" href="/dzps/src/layuiadmin/style/login.css" media="all">
        <style type="text/css">
        #card{
            left:15px;
        }
            .layui-card-body {
                position: relative;
                padding: 10px 5px;
            }
            
            .layui-colla-title {
                background-color: #f9f3f300;
            }
            
            .layui-colla-icon {
                left: 15px;
            }
            
            .layadmin-user-login-footer {
                position: relative;
            }
            
            .divRight {
                float: right;
                margin-bottom: 15px;
            }
            .layuiadmin-home2-usernote .layuiadmin-reply{display: none; position: absolute; right: 15px; bottom: 12px;}
            .layuiadmin-home2-usernote li:hover .layuiadmin-reply{display: block;}
        </style>
</head>

<body>
    <div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;">
        <div class="layadmin-user-login-main">
            <div class="layadmin-user-login-box layadmin-user-login-header">
                <h2>
                    <%
			if val("title")="科室" then
				echo val("local")
			else
				echo val("title")&"故障报修"
			end if
			%>
                </h2>
                <p>
                    <%=val("equipmentName")%>
                </p>
            </div>
            <div class="layadmin-user-login-box layadmin-user-login-body layui-form">
                <%
		s1 "select truename,mobile from [user] where is_duty=1"
		vas "txt","本周主班："&val("truename") &"    "&val("mobile") & "<br><hr><br>" &  zkh(val("department") & "     " & val("local") & val("ipadr") & "   " & val("machineNo") )
		blockquote(val("txt"))
		input_h("equipmentId")
		%>

                    <div class="layui-form-item">
                        <textarea name="questionDescription" placeholder="请输入故障描述" lay-verify="required" class="layui-textarea"></textarea>
                    </div>
                    <div class="layui-form-item">
                        <label class="layadmin-user-login-icon layui-icon layui-icon-table" for="icon-table"></label>
                        <input type="text" id="declare" name="declare" lay-verify="required" placeholder="姓名" class="layui-input">
                    </div>
                    <div class="layui-form-item">
                        <label class="layadmin-user-login-icon layui-icon layui-icon-cellphone" for="LAY-user-login-cellphone"></label>
                        <input type="text" id="declareTele" name="declareTele" id="LAY-user-login-declareTele" lay-verify="required" placeholder="联系电话" class="layui-input">
                    </div>
                    <div class="layui-form-item">
                        <label class="layadmin-user-login-icon layui-icon-read"></label>
                        <input type="text" id="code" name="code" id="code" lay-verify="required" placeholder="验证码" class="layui-input">
                    </div>
                    <img class="divRight" id="checkcode" src="/dzps/AsaiCodeS1/EESaiCodeImgS/?code.jpg" alt="看不清楚？请点击刷新！" onClick="this.src=this.src+'?'+Math.random();">
                    <div class="layui-form-item">
                        <button class="layui-btn layui-btn-fluid" lay-submit lay-filter="LAY-user-reg-submit" id="LAY-user-reg-submit">提  交</button>
                    </div>
                        <div class="layui-card">
                            <div class="layui-card-header">历史数据</div>
                            <div class="layui-card-body">
                                <ul class="layuiadmin-card-status layuiadmin-home2-usernote">
                                    <div class="layui-collapse" lay-accordion lay-filter="cd1">
                                    </div>
                                </ul>
                            </div>
                        </div>
            </div>
        </div>
    </div>
    </div>
    <div class="layui-trans layadmin-user-login-footer">
        <p>© 2020 <a href="http://" target="_blank">信息科</a></p>
    </div>
    <script src="/dzps/src/layuiadmin/layui/layui.js"></script>
    <script>
        layui.config({
            base: '/dzps/src/layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'user'], function() {
            var $ = layui.$,
                setter = layui.setter,
                admin = layui.admin,
                form = layui.form,
                router = layui.router();
            $("#declareTele").attr("lay-verify", "required|phone|number");

            $("#declareTele").blur(function(){
                var tt= $("#declareTele").val().replace(/[ ]/g,'');
                $("#declareTele").val(tt);
            }
                 );
      $.ajax({
            url:'pj2.asp?action=div_data&equipmentid=<%=val("equipmentId")%>',
            success:function(res){
                $('div.layui-collapse').html(res);
              },
            error:function(error){
                    alert('数据加载失败');
            }
        });            
            form.on('submit(LAY-user-reg-submit)', function(obj) {
                var field = obj.field;
                admin.req({
                    url: 'pjson.asp?action=log1_add&now=' + new Date().getTime() + "&typ=<%=val("typ")%>&status=898&mobile=<%=val("mobile")%>&need_mysql=1",
                    data: field,
                    done: function(res) {
                        layer.msg(res.msg, {
                            offset: '15px',
                            icon: 1,
                            time: 1000
                        }, function() {
                            location.reload();
                        });
                    }
                });
                return false;
            });
        });
    </script>
</body>

</html>